Inheritance vs . delegation : Is one better than the other ?

نویسنده

  • Peter Bosch
چکیده

In this paper I will discuss the differences between inheritance based systemsand delegation based systems. Specifically, I would like to discuss the way objects are organized in both systems, the way inheritance is implemented, how the self variable is treated and I would like to discuss the advantages and disadvantages of both language types.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Delegation vs Inheritance for Typestate Analysis

For several decades, inheritance and delegation have been widely adopted for code reuse in object-oriented languages. Though extensive research has explored the expressiveness of these techniques, little is known about how the choice between them affects formal reasoning. In this paper, we explore this question by describing two core languages that are identical except for the use of inheritanc...

متن کامل

Clap 1 :: Ann Object-orientedd Programmingg Systemm Forr Distributedd Memoryy Parallell Machines

The Agha and Hewitt Actor model [1, 13, 14] is a natural extension of the object paradigm as we know it to the field of parallel programming. The model respects the primary principles of object-oriented programming, i.e. abstraction of data and encapsulation, inheritance or delegation, communication via message-sending, modularity and homogeneity. However, it adds the principle of activity, i.e...

متن کامل

Delegation as a Sharing Relation: Characterization and Interpretation

We introduce a new simple formalism in order to characterize sharing mechanisms in object-oriented languages. This formalism is based on the three notions of name sharing, property sharing and value sharing. We use it to identify the kind of sharing achieved by class-inheritance in class-based languages in a comparison with the one achieved by delegation in prototype-based languages. We also po...

متن کامل

Comparative study of the Quranic thought of the dominance of religion (Islam) on other religions from the perspective of Allameh Tabatabai, Alousi

In the Holy Qur'an, there are three promises including overcoming the religion on other religions, the inheritance of the believers and the righteous of believers. Do these interpretations have just one related message, that is, the rule of Islam for the world, or any separate message? On this basis; we can provide another question: Is Islam overcoming the same with inheritance of the believers...

متن کامل

Automated Delegation is a Viable Alternative to Multiple Inheritance in Class Based Languages

Multiple inheritance is still a controversial feature in traditional object-oriented languages, as evidenced by its omission from such languages as Modula-3, Objective C and JavaTM. Nonetheless, users of such languages often complain about having to work around the absence of multiple inheritance. Automating delegation, in combination with a multiple subtyping mechanism, provides many of the sa...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007